import 'package:json_annotation/json_annotation.dart';

import '../chat/hb_message_type.dart';
import '../chat/hb_rtm_message_type.dart';
import 'hb_rtm_emoji_at_text.dart';
import 'hb_rtm_message_detail_type.dart';
import 'hb_rtm_user_ext_info.dart';
part 'hb_rtm_msg_detail.g.dart';

@JsonSerializable()
class HbRtmMsgDetail {
  /// 用户账号 eg:2060372
  String? account;

  /// 用户nikename eg:游客6697230
  String? nickName;

  /// 接收礼物的人的姓名
  String? receiveNickName;

  /// eg:2.9.3
  String? curVersion;

  /// eg:'hhhhh'
  String? message;

  /// https://haowallpaper.com/link/common/file/getCroppingImg/15024962018118976
  String? headPortraitsUrl;
  String? roomNo;

  /// 礼物数量
  int? giftCount;

  /// 礼物地址视频地址
  String? objectVapUrl;

  /// 礼物图片地址 (svga 结尾)
  String? objectGifUrl;

  /// 礼物图片地址 (png 结尾)
  String? objectUrl;

  bool? roomInteractShow;
  bool? needFlyAnimation;
  bool? isNeedWelcome;
  bool? inviteIsInseat;
  bool? hasAnimation;
  bool? isCelebration;
  bool? isStarlight;
  bool? isCountHeight;
  bool? isInviteGangUpMessage;
  bool? isMaskFace;
  bool? isTodayBirthday;
  bool? isPlayAnimation;
  bool? managerPermit;
  bool? inviteMicIsClick;

  // eg:99
  int? owner;
  int? roomVipType;
  int? gameScore;
  int? lianMaiNumber;
  int? vipStatusChange;

  int? rowHeight;

  int? typeValue;
  int? roomNewVipType;
  int? localNoticeType;
  int? seatIndex;
  int? isHiddenTag;
  int? appType;
  int? livePauseDeadline;
  int? textLabelWidth;
  // int? type;
  int? inviteAndWelcomeType;
  int? bannerId;

  int? isHiddenAirBubbles;
  int? drivingStatus;

  int? drivingCurrentStep;

  /// socket 消息类型
  @JsonKey(name: 'messageType')
  @HBRtmMessageDetailTypeConverter() // 使用注解方式
  HBRtmMessageDetailType? messageType;

  int? truthOrDareType;
  int? gameId;

  int? hotValue;
  int? rewardCount;
  int? answerType;

  int? micMode;
  int? drivingId;

  int? rewardId;
  int? curUserInMic;
  int? validDays;
  int? isAllMic;

  int? drivingActiveStep;
  int? charmType;
  int? sendGameResultGifType;
  int? parentMsgType;
  int? gender;
  int? closeFriendType;
  int? lianMaiStatus;
  int? maxWidth;
  int? drivingLimitStep;

  int? statusType;

  int? roomRole;

  int? nobleRankCode;

  HbRtmUserExtInfo? userExtInfo;
  HbRtmEmojiAtText? emojiAtText;

  HbRtmMsgDetail();
  factory HbRtmMsgDetail.fromJson(Map<String, dynamic> json) =>
      _$HbRtmMsgDetailFromJson(json);
  Map<String, dynamic> toJson() => _$HbRtmMsgDetailToJson(this);
}
